<template>
  <div class="pdf-list">
    <div class="pdf-item" v-for="item in list" v-bind:key="item.id">
      <div class="left">
        <div class="date">{{ item.date }}</div>
        <div class="name">{{ item.name }}</div>
      </div>
      <div class="status-yes" v-if="item.status === 0">
        <span class="material-symbols-outlined"> download </span>
      </div>
      <div class="status-no" v-else>
        检测中
      </div>
    </div>
  </div>
</template>

<script setup>
import {ref} from 'vue'

const list = ref([
  {
    id: 1,
    date: '2023年11月05日 10:22:35 ',
    name: '锆石U-Pb定年分析.pdf',
    status: 0
  },
  {
    id: 2,
    date: '2023年11月05日 10:22:35 ',
    name: '锶同位素分析（岩石）.pdf',
    status: 1
  }
])
</script>

<style scoped lang="scss">
.pdf-list{
  .pdf-item{
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: dpi(3rem) 0 dpi(3rem) dpi(3rem);
    background-color: #ffffff;
    box-shadow: 0rem dpi(1rem) dpi(2rem) 0rem rgba(0, 0, 0, 0.05);
    border: solid 2px #0571b0;
    font-family: AdobeHeitiStd-Regular;
    font-size: dpi(2rem);
    
    .date{
      font-family: PingFangSC-Regular;
      color: #0571b0;
    }
    .name{
      margin-top: dpi(1rem);
      font-family: PingFangSC-Medium;
      color: #05204d;
    }
    &:not(&:last-child) {
      margin-bottom: dpi(2rem);
    }

    .status-no{
      margin-right: dpi(4rem);
      color: #ff0000;
    }
    .status-yes{
      display: flex;
      align-items: center;
      justify-content: center;
      position: absolute;
      top: 0;
      right: 0;
      width: dpi(6rem);
      height: 100%;
      background-color: rgba(5, 113, 176, 0.1);
      border: solid 1px #dddddd;
      .material-symbols-outlined{
        font-size: dpi(2rem);
        color: #0571b0;
      }
    }
  }
}
</style>